this.textMessages = new Object({_beansDesc:"Minimal damage with a high rate of fire.",_friesDesc:"Medium damage and a high rate of fire. Useless against Ping Pangs",_pepsiDesc:"Minimal damage with a low rate of fire, but good for slowing movement",_wingsDesc:"Maximum damage with a low rate of fire. Useless against Pang Pangs",_burgerDesc:"Maximum damage and a medium rate of fire",_e1Desc:"Immune to the Pepsi Weapon!",_e1Desc2:"Immune to the Pepsi Weapon!",_e2Desc:"Immune to the Fries Weapon!",_e3Desc:"",_e4Desc:"Immune to the Chicken Weapon!",_e5Desc:"",_e6Desc:"Immune to the Pepsi Weapon!",_e6Desc2:"Immune to both the Pepsi and Chicken Weapons!",_weaponOptions:"Press U to upgrade or S to sell.",_weaponOff:"This Weapon is not available yet",_weaponOver:"Click to select this Weapon",_menuOver:"Click to access to the Main Menu",_creditsOver:"Credits left",_levelOver:"Current Level",_livesOver:"Lives left",_timeOver:"Hunger kept at bay for:",_sellOver:"Sell the selected Weapon",_sellOver2:"Select a Tower to sell",_upgradeOver:"Upgrade the selected Weapon",_upgradeOver2:"Select a Weapon to upgrade",_upgradeOver3:"You donΓÇÖt have enough credit to upgrade this Weapon",_levDef:"Are you satisfied yet? Well, let\'s move on to the next level!",_levBoss1:"Boss Level!",_levBoss2:"Double Boss - immune to Pepsi! Upgrade!",_levBoss3:"Triple Boss - immune to Pepsi and Chicken!",_levNewTower:"New Weapon unlocked!",_levImFries:"Ping Pangs - immune to Fries! Upgrade!",_levImPepsi:"Orangupangs - immune to Pepsi! Upgrade!",_levImWings:"Pang Pangs - immune to Chicken! Upgrade!",_wCannotBePlaced:"This Weapon cannot be placed here",_wCanBePlaced:"Click to place the Weapon"});
}
function startSound(sName, bLoop)
{
this[sName] = new Sound();
this[sName].attachSound(sName);
if(bLoop)
{
this[sName].start(0,99);
}
else
{
this[sName].start();
}
}
function stopSound(sName)
{
this[sName].stop();
}
function setLevelMessage(nLvl)
{
switch(nLvl)
{
case 3:
return this.textMessages._levNewTower;
case 5:
return this.textMessages._levNewTower;
case 6:
return this.textMessages._levBoss1;
case 8:
return this.textMessages._levImFries;
case 11:
return this.textMessages._levNewTower;
case 12:
return this.textMessages._levBoss2;
case 13:
return this.textMessages._levImPepsi;
case 16:
return this.textMessages._levImWings;
case 17:
return this.textMessages._levNewTower;
case 18:
return this.textMessages._levBoss3;
case 19:
return this.textMessages._levImPepsi;
case 24:
return this.textMessages._levBoss3;
case 30:
return this.textMessages._levBoss3;
case 36:
return this.textMessages._levBoss3;
default:
return "empty";
}
}
function initEnemyVariables()
{
this.enemyEnergy = new Array(null,30,40,45,50,60,1000,180,160,260,300,360,3000,360,280,400,500,600,6000,900,800,960,1000,1100,8000,1300,1100,1350,1400,1500,10000,3000,2600,3500,3800,4200,30000,5000,5500,6000,6500,7000,50000,8000,10000,12000,13000,16000,200000);
this.enemySpeed = new Array(null,1.3,1.4,1.6,1.7,1.5,1);
this.enemyNumber = new Array(null,10,12,14,16,18,1);
this.enemyType = new Array(null,"Orangupangs","Ping Pangs","Wu-Pang Clan","Pang Pangs","The Big Pang","Skull");
this.enemyTimeGap = new Array(null,1500,1000,800,800,700,800);
this.enemyValue = new Array(null,1,1,2,2,2,100);
}
function initWeaponVariables()
{
this.range = new Object({Beans1:150,Beans2:200,Beans3:250,Fries1:180,Fries2:240,Fries3:280,Pepsi1:150,Pepsi2:200,Pepsi3:250,Wings1:250,Wings2:280,Wings3:320,Burger1:150,Burger2:180,Burger3:220});
this.damage = new Object({Beans1:4,Beans2:8,Beans3:20,Fries1:40,Fries2:70,Fries3:100,Pepsi1:10,Pepsi2:10,Pepsi3:10,Wings1:400,Wings2:800,Wings3:1200,Burger1:500,Burger2:1000,Burger3:2000});
this.delay = new Object({Beans1:0.8,Beans2:0.5,Beans3:0.5,Fries1:0.8,Fries2:0.6,Fries3:0.5,Pepsi1:2,Pepsi2:1.7,Pepsi3:1.5,Wings1:1.8,Wings2:1.5,Wings3:1.2,Burger1:1.4,Burger2:1,Burger3:0.6});
this.upgradeCost = new Object({Beans1:24,Beans2:60,Fries1:60,Fries2:100,Pepsi1:80,Pepsi2:180,Wings1:300,Wings2:800,Burger1:800,Burger2:2000});
this.wValue = new Object({Beans1:8,Beans2:this.upgradeCost.Beans1,Beans3:this.upgradeCost.Beans2,Fries1:30,Fries2:this.upgradeCost.Fries1,Fries3:this.upgradeCost.Fries2,Pepsi1:40,Pepsi2:this.upgradeCost.Pepsi1,Pepsi3:this.upgradeCost.Pepsi2,Wings1:120,Wings2:this.upgradeCost.Wings1,Wings3:this.upgradeCost.Wings2,Burger1:300,Burger2:this.upgradeCost.Burger1,Burger3:this.upgradeCost.Burger2});
this.unlockLevel = new Object({Beans:1,Fries:3,Pepsi:5,Wings:11,Burger:17});
this.sdTime = new Object({Pepsi1:3,Pepsi2:5,Pepsi3:8});
this.sdMult = new Object({Pepsi1:0.7,Pepsi2:0.6,Pepsi3:0.5});